Skip to main content

translateY

Type​

property

Summary​

Sets the vertical translation of an object by moving it along the Y-axis

Syntax​

set the translateY of object to <number>[%]

Description​

Use the translateY property to move an object vertically in pixels or as a percentage of its height. This property can only be set, getting the value will return empty.

When set, it moves the object by updating its top position relative to the current position.

Examples​

# Move 100 pixels down
set the translateY of btn "MyButton" to 100
# Move down by half the object's height
set the translateY of btn "MyButton" to "50%"

Value​

NameTypeDescription

value

The distance to translate the object vertically. Can be:

  • A number (in pixels)
  • A percentage (e.g., "50%") relative to the object's height

Compatibility and Support​

OS

mac

windows

linux

ios

android

Platforms

desktop

mobile

web